<template>
  <el-dialog :title="title" :visible.sync="dialogVisible">
    <div class="Dialog">
      <div class="content">
        <div class="tableList flex">
          <div class="tableList_title">应急角色</div>
          <div class="tableList_con">
            <el-input placeholder="请输入应急角色" v-model="List.应急角色" clearable />
          </div>
          <div class="tableList_title">人员姓名</div>
          <div class="tableList_con">
            <el-input placeholder="请输入人员姓名" v-model="List.人员姓名" clearable />
          </div>
        </div>
        <div class="tableList flex">
          <div class="tableList_title">公司职务</div>
          <div class="tableList_con">
            <el-input placeholder="请输入公司职务" v-model="List.公司职务" clearable />
          </div>
          <div class="tableList_title">所在单位</div>
          <div class="tableList_con">
            <el-input placeholder="请输入所在单位" v-model="List.所在单位" clearable />
          </div>
        </div>
        <div class="tableList flex">
          <div class="tableList_title">联系电话</div>
          <div class="tableList_con">
            <el-input placeholder="请输入联系电话" v-model="List.联系电话" clearable />
          </div>
          <div class="tableList_title">属于指挥部</div>
          <div class="tableList_con">
            <el-select v-model="List.属于指挥部" placeholder="请选择属于指挥部">
              <el-option v-for="item in whetherList" :key="item.value" :label="item.label" :value="item.value" />
            </el-select>
          </div>
        </div>
        <div class="tableList flex">
          <div class="tableList_title">属于工作组</div>
          <div class="tableList_con">
            <el-select v-model="List.属于工作组" placeholder="请选择属于工作组">
              <el-option v-for="item in whetherList" :key="item.value" :label="item.label" :value="item.value" />
            </el-select>
          </div>
          <div class="tableList_title">所属</div>
          <div class="tableList_con">
            <el-select v-model="List.所属" multiple clearable placeholder="请选择">
              <el-option v-for="item in belongList" :key="item" :label="item" :value="item" />
            </el-select>
          </div>
        </div>
      </div>
      <div class="dialog-footer">
        <div class="btns flex">
          <div @click="addEventListener">确定</div>
          <div @click="dialogVisible = false">取消</div>
        </div>
      </div>
    </div>
  </el-dialog>
</template>
<script>
import axios from "axios";
export default {
  props: {
    title: String,
    List: {
      type: Object,
      default: () => ({
        应急角色: "",
        人员姓名: "",
        公司职务: "",
        所在单位: "",
        联系电话: "",
        属于指挥部: "",
        属于工作组: "",
        所属: [],
      })
    }
  },
  data() {
    return {
      dialogVisible: false,
      belongList: ['运输组', '抢修组', '接待组', '专家组', '治安组', '消防队', '医疗救护组', '物资供应组', '应急监测组', '应急救援指挥部', '生产运行及通信联络组'],
      whetherList: [
        { value: '1', label: '是' },
        { value: '0', label: '否' },
      ],
    };
  },
  watch: {
  },
  methods: {
    addEventListener() {
      this.$emit('addEventListener', this.List,this.title)
      this.dialogVisible = false
    },
  },
  mounted() {
  },
};
</script>
<style lang="scss" scoped>
::v-deep .el-dialog {
  width: 1000px;
  height: 610px;
  margin-top: 270px !important;

  .el-dialog__header {
    padding: 7px 16px;
    height: 36px;
    box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.05);

    .el-dialog__title {
      font-family: "Source Han Sans CN";
      font-size: 16px;
      font-weight: 900;
    }

    .el-dialog__headerbtn {
      top: 10px;
    }
  }

  .el-dialog__body {
    padding: 0;
  }

  .Dialog {
    width: 1000px;
    height: 542px;
    font-family: "Source Han Sans CN";
    font-style: normal;

    .flex {
      display: flex;
      justify-content: space-between;
    }

    .content {
      margin: 32px auto;
      width: 920px;
      height: 454px;
      border-top: 2px solid #165DFF;
      border-bottom: 2px solid #165DFF;

      .tableList {
        width: 920px;
        height: 113.5px;
        border-bottom: 1px solid rgba(22, 93, 255, 0.50);

        &:last-child {
          border-bottom: none;
        }

        .tableList_title {
          width: 126px;
          height: 113.5px;
          line-height: 113.5px;
          padding-left: 18px;
          background: rgba(22, 93, 255, 0.05);
        }

        .tableList_con {
          width: 334px;
          padding: 40.75px 18px;

        }
      }
    }

    .dialog-footer {
      width: 1000px;
      height: 56px;
      box-shadow: 0px -5px 10px 0px rgba(0, 0, 0, 0.05);
      padding-top: 13px;

      .btns {
        margin-left: 811px;
        width: 124px;
        height: 32px;

        div {
          width: 58px;
          height: 32px;
          line-height: 32px;
          text-align: center;
          border-radius: 4px;

          &:nth-child(1) {
            background: #165DFF;
            box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.04);
            color: #FFF;
            font-size: 14px;
            font-weight: 700;
          }

          &:nth-child(2) {
            border: 1px solid #165DFF;
            color: rgba(22, 93, 255, 0.70);
            font-size: 14px;
            font-weight: 350;
          }

          &:hover {
            cursor: pointer;
          }
        }
      }
    }
  }
}

::v-deep .el-input--medium .el-input__inner {
  height: 32px !important;
  line-height: 32px !important;
  width: 290px !important;
  border: none;
}

::v-deep .el-date-editor.el-input,
.el-date-editor.el-input__inner {
  width: 290px !important;
}
</style>
